<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			div{
				width: 100px;
				height: 100px;
				background-color: red;
				margin: 50px;
				position: relative;
			}
		</style>
	</head>
	<body>
		
		<div class="p1"></div>
		
		<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
		<script>
			$("div[class='p1']").click(function(){
				//设置多个属性
				$("div[class='p1']").animate({left:'250px',top:"200px"});
				//使用相对值
				$("div[class='p1']").animate({left:'+=250px',top:"-=200px"});
			})
		</script>
	</body>
</html>